package com.baidu.day02;

import java.io.File;

public class Demo11 {
    public static void main(String[] args) {
        File f = new File("C:\\Users\\DAJU\\Desktop\\新建文件夹 (2)");
        delALL(f);
        f.delete();

    }
    public static void delALL(File f){
    File [] fArr = f.listFiles();
        for (int i = 0; i < fArr.length; i++) {
            if (fArr[i].isFile()){
                fArr[i].delete();
            }else{
                delALL(fArr[i]);
                fArr[i].delete();
            }
        }


    }




}
